/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package components;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;

/**
 *
 * @author Sonia Tan
 */
public class Button extends JButton  {

    public String image;

    public Button(String image, int width,int height){

        this.image = image;
        setIcon(new ImageIcon(getClass().getResource("/images/"+image)));
        setSize(width,height);
        setBorderPainted(false);
        setContentAreaFilled(false);
       
    }

    public void setRollover(String rollover){
        setRolloverIcon(new ImageIcon(getClass().getResource("/images/"+rollover)));
    }


}
